<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
    <title>各地房价热力图，杭州、北京、上海、苏州、天津、成都、南京、长沙、无锡、南宁、太原、青岛、南昌、郑州</title>
    <script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <style type="text/css">
        ul, li {
            list-style: none;
            margin: 0;
            padding: 0;
            float: left;
        }

        html {
            height: 100%
        }

        body {
            height: 100%;
            margin: 0;
            padding: 0;
            font-family: "微软雅黑";
        }

        #main {
            display: flex;
            flex: 1;
            flex-direction: row;
            height: 100%;
        }

        #container {
            width: 100%;
            height: 100%;
        }

        #map {
            width: 100%;
            height: 100%;
        }

        #nav {
            width: 180px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background: #fafafa;
        }

        #qrcode {
            width: 160px;
            height: 160px;
        }

        #logo {
            font-size: 20px;
            text-align: center;
            padding-top: 10px;
            padding-bottom: 10px;
        }

        .cityList {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        #author {
            height: 180px;
        }

        .cityItem {
            height: 40px;
            text-align: center;
            line-height: 40px;
            cursor: pointer;
        }

        .select {
            color: #ffffff;
            background: rgba(36, 119, 251, 1);
            border-bottom: 0.5px solid rgba(62, 187, 243, 0.8);
        }

        .default {
            color: rgba(36, 119, 251, 1);
            background: #f0f0f0;
            border-bottom: 0.5px solid rgba(208, 208, 208, 0.8);
        }

        .itemSmall {
            border-left: 0.5px solid rgba(208, 208, 208, 0.8);
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            // 奈何jQuery不熟练呀 //
            $('.cityItem').click(function (event) {
                var current = $(this);
                var list = $('.cityItem');
                for (var i = 0; i < list.length; i++) {
                    $(list[i]).addClass('default');
                }
                current.removeClass('default');
                current.addClass('select');
                $('#map').attr('src', 'map.html?city=' + current.data()['id']);
            })
        });
    </script>
</head>
<body>
<div id="main">
    <div id="nav">
        <div>
            <div id="logo">房价热力图</div>
            <ul class="cityList">
                <li class="cityItem select" data-id="hz">杭州</li>
                <li class="cityItem default" data-id="bj">北京</li>
                <li class="cityItem default" data-id="sh">上海</li>
                <li class="cityItem default" data-id="sz">苏州</li>
            </ul>
            <ul class="cityList" style="width: 50%">
                <li class="cityItem default" data-id="tj">天津</li>
                <li class="cityItem default" data-id="nj">南京</li>
                <li class="cityItem default" data-id="wx">无锡</li>
                <li class="cityItem default" data-id="ty">太原</li>
                <li class="cityItem default" data-id="nc">南昌</li>
            </ul>
            <ul class="cityList" style="float: right; width: 50%">
                <li class="cityItem default itemSmall" data-id="cd">成都</li>
                <li class="cityItem default itemSmall" data-id="cs">长沙</li>
                <li class="cityItem default itemSmall" data-id="nn">南宁</li>
                <li class="cityItem default itemSmall" data-id="qd">青岛</li>
                <li class="cityItem default itemSmall" data-id="zz">郑州</li>
            </ul>
        </div>
        <div id="author">
            <img id="qrcode" src="images/qrcode.jpg">
            <!-- <div style="text-align: center">欢迎扫码关注</div> -->
        </div>
    </div>
    <div id="container">
        <iframe scrolling="no" frameborder="0" id="map" src="map.html?city=hz"/>
    </div>
</div>
</body>
</html>